package com.juku2024.juku.adapter

import android.text.TextUtils
import android.widget.ImageView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.module.LoadMoreModule
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.juku2024.juku.R
import com.juku2024.juku.tools.ImageUtils
import java.util.*

class FeedbackImageAdapter(data: ArrayList<String?>) :
    BaseQuickAdapter<String?, BaseViewHolder>(R.layout.item_feedback_image, data), LoadMoreModule {

    override fun convert(holder: BaseViewHolder, item: String?) {
        val iv = holder.getView<ImageView>(R.id.ivFeedback)
        if (TextUtils.isEmpty(item)) {
            ImageUtils.loadImage(iv, R.drawable.ic_feedback_imagedefault)
        } else {
            ImageUtils.loadImage(iv, item)
        }
    }

}